Skip to content

Conversation

@lia-viam
Copy link
Collaborator

No description provided.

@lia-viam lia-viam requested a review from a team as a code owner January 15, 2025 21:24
@lia-viam lia-viam requested review from njooma and purplenicole730 and removed request for a team January 15, 2025 21:24
Copy link
Member

@acmorrow acmorrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great. I think several of the places where grpc is being tagged as a dependency are perhaps vestigial?

target_link_libraries(simple_module
PRIVATE Threads::Threads
viam-cpp-sdk::viamsdk
${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little surprised that simple_module has a direct link dependency on grpc?

target_link_libraries(tflite_module
PRIVATE Threads::Threads
PRIVATE viam-cpp-sdk::viamsdk
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto tflite module dependency on grpc


target_link_libraries(example_module
viam-cpp-sdk::viamsdk
gRPC::grpc++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question

PUBLIC Boost::log
PUBLIC xtensor
PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES}
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES}
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
PRIVATE ${VIAMCPPSDK_GRPC_LIBRARIES}
PRIVATE ${VIAMCPPSDK_PROTOBUF_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⬇️ - I have a suspicion there may no longer be any actual direct usage of abseil in viamsdk. Can you please check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happily you're right!

target_link_libraries(example_dial_api_key
Boost::program_options
viam-cpp-sdk::viamsdk
${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any actual use of grpc in this examples sources.

#
find_package(viam-cpp-sdk CONFIG REQUIRED viamsdk)

find_package(gRPC CONFIG REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops good catch thank you

@lia-viam lia-viam requested a review from acmorrow January 16, 2025 21:28
Copy link
Member

@acmorrow acmorrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a question.


self.requires('xtensor/[>=0.24.3]')
self.requires('abseil/[>=20230125.3]', transitive_libs=True)
self.requires('abseil/[>=20230125.3]')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually still needed? I'd expect absl to be a transitive dep of proto/grpc so not needing to be mentioned here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised by this too but yes--my working theory is that it's because the API gencode does include some abseil headers/need some of their symbols, this was making the build fail with undefined symbol errors when I took it out

if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components[component].system_libs = ["pthread"]

self.cpp_info.components["viamapi"].requires.append("abseil::absl_strings")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing this is related to above inclusion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly!

@lia-viam lia-viam merged commit 0504fa1 into viamrobotics:main Jan 16, 2025
13 checks passed
@lia-viam lia-viam deleted the google-private branch January 16, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants